﻿using System.ComponentModel;

namespace iStudio.Structure.Engine
{
    /// <summary>
    /// Provides access to functionality that is common
    /// across all sound players.
    /// </summary>
    /// <seealso cref="IWaveformPlayer"/>
    /// <seealso cref="ISpectrumPlayer"/>
    public interface ISoundPlayer : INotifyPropertyChanged
    {
        /// <summary>
        /// Gets whether the sound player is currently playing audio.
        /// </summary>
        bool IsPlaying
        {
            get;
        }

        /// <summary>
        /// Gets whether the sound player will repeat when reacing the end of stream or selection.
        /// </summary>
        bool Repeat
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets the current sound streams playback position.
        /// </summary>
        double ChannelPosition
        {
            get;
            set;
        }

        /// <summary>
        /// Check if the engine can play a file.
        /// </summary>
        bool CanPlay
        {
            get;
        }

        /// <summary>
        /// Check if engine can pause playing.
        /// </summary>
        bool CanPause
        {
            get;
        }

        /// <summary>
        /// Check if engine can stop playing.
        /// </summary>
        bool CanStop
        {
            get;
        }

        /// <summary>
        /// Stops current playing stream.
        /// </summary>
        void Stop ();

        /// <summary>
        /// Pauses current playing stream.
        /// </summary>
        void Pause ();

        /// <summary>
        /// Plays current stream.
        /// </summary>
        void Play ();
    }
}